﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WindowsFormsView;

namespace WindowsFormsPresenter.Unit
{
    public class UnitsPresenter : Presenter<IUnitsView>
    {
        public UnitsPresenter(IUnitsView view)
            : base(view)
        {
        }

        public void Display()
        {
            View.Units = Model.GetUnits();
        }

        public void DisplayByPage(int currentPage)
        {
            View.Units = Model.GetUnitsByPage(currentPage);
        }

        public int GetTotalPage()
        {
            return Model.GetTotalPageFromUnit();
        }

        public void DisplayActive()
        {
            View.Units = Model.GetUnitsActive();
        }
    }
}
